# ！ /usr/bin/python3
# -*- coding:utf-8 -*-
# @Author:Peng Cao
# @File: 03img_thresh.py
# @Software: PyCharm
import cv2.cv2 as cv
import matplotlib.pyplot as plt
import numpy as np

img = cv.imread('./data/cat.jpg')
cv.imshow("img", img)
new_img = cv.blur(src=img, ksize=(3, 3))
cv.imshow("new_img", new_img)
new_img2 = cv.boxFilter(img, -1, (3, 3), normalize=True)
cv.imshow('new_img2', new_img2)
new_img3 = cv.GaussianBlur(src=img, ksize=(5, 5), sigmaX=1)
cv.imshow('new_img3', new_img3)
new_img4 = cv.medianBlur(img, 5)
cv.imshow('new_img4', new_img4)
cv.waitKey(0)
cv.destroyAllWindows()
